package com.pobing.grpc.lib.move;

import static io.grpc.MethodDescriptor.generateFullMethodName;

/**
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.37.1)",
    comments = "Source: move.proto")
public final class MoveServiceGrpc {

  private MoveServiceGrpc() {}

  public static final String SERVICE_NAME = "move.MoveService";

  // Static method descriptors that strictly reflect the proto.
  private static volatile io.grpc.MethodDescriptor<com.pobing.grpc.lib.move.MoveRequest,
      com.pobing.grpc.lib.move.MoveResponse> getSayMoveMethod;

  @io.grpc.stub.annotations.RpcMethod(
      fullMethodName = SERVICE_NAME + '/' + "SayMove",
      requestType = com.pobing.grpc.lib.move.MoveRequest.class,
      responseType = com.pobing.grpc.lib.move.MoveResponse.class,
      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
  public static io.grpc.MethodDescriptor<com.pobing.grpc.lib.move.MoveRequest,
      com.pobing.grpc.lib.move.MoveResponse> getSayMoveMethod() {
    io.grpc.MethodDescriptor<com.pobing.grpc.lib.move.MoveRequest, com.pobing.grpc.lib.move.MoveResponse> getSayMoveMethod;
    if ((getSayMoveMethod = MoveServiceGrpc.getSayMoveMethod) == null) {
      synchronized (MoveServiceGrpc.class) {
        if ((getSayMoveMethod = MoveServiceGrpc.getSayMoveMethod) == null) {
          MoveServiceGrpc.getSayMoveMethod = getSayMoveMethod =
              io.grpc.MethodDescriptor.<com.pobing.grpc.lib.move.MoveRequest, com.pobing.grpc.lib.move.MoveResponse>newBuilder()
              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SayMove"))
              .setSampledToLocalTracing(true)
              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.pobing.grpc.lib.move.MoveRequest.getDefaultInstance()))
              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
                  com.pobing.grpc.lib.move.MoveResponse.getDefaultInstance()))
              .setSchemaDescriptor(new MoveServiceMethodDescriptorSupplier("SayMove"))
              .build();
        }
      }
    }
    return getSayMoveMethod;
  }

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static MoveServiceStub newStub(io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<MoveServiceStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<MoveServiceStub>() {
        @java.lang.Override
        public MoveServiceStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new MoveServiceStub(channel, callOptions);
        }
      };
    return MoveServiceStub.newStub(factory, channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static MoveServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<MoveServiceBlockingStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<MoveServiceBlockingStub>() {
        @java.lang.Override
        public MoveServiceBlockingStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new MoveServiceBlockingStub(channel, callOptions);
        }
      };
    return MoveServiceBlockingStub.newStub(factory, channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static MoveServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    io.grpc.stub.AbstractStub.StubFactory<MoveServiceFutureStub> factory =
      new io.grpc.stub.AbstractStub.StubFactory<MoveServiceFutureStub>() {
        @java.lang.Override
        public MoveServiceFutureStub newStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
          return new MoveServiceFutureStub(channel, callOptions);
        }
      };
    return MoveServiceFutureStub.newStub(factory, channel);
  }

  /**
   */
  public static abstract class MoveServiceImplBase implements io.grpc.BindableService {

    /**
     */
    public void sayMove(com.pobing.grpc.lib.move.MoveRequest request,
        io.grpc.stub.StreamObserver<com.pobing.grpc.lib.move.MoveResponse> responseObserver) {
      io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSayMoveMethod(), responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            getSayMoveMethod(),
            io.grpc.stub.ServerCalls.asyncUnaryCall(
              new MethodHandlers<
                com.pobing.grpc.lib.move.MoveRequest,
                com.pobing.grpc.lib.move.MoveResponse>(
                  this, METHODID_SAY_MOVE)))
          .build();
    }
  }

  /**
   */
  public static final class MoveServiceStub extends io.grpc.stub.AbstractAsyncStub<MoveServiceStub> {
    private MoveServiceStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected MoveServiceStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new MoveServiceStub(channel, callOptions);
    }

    /**
     */
    public void sayMove(com.pobing.grpc.lib.move.MoveRequest request,
        io.grpc.stub.StreamObserver<com.pobing.grpc.lib.move.MoveResponse> responseObserver) {
      io.grpc.stub.ClientCalls.asyncUnaryCall(
          getChannel().newCall(getSayMoveMethod(), getCallOptions()), request, responseObserver);
    }
  }

  /**
   */
  public static final class MoveServiceBlockingStub extends io.grpc.stub.AbstractBlockingStub<MoveServiceBlockingStub> {
    private MoveServiceBlockingStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected MoveServiceBlockingStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new MoveServiceBlockingStub(channel, callOptions);
    }

    /**
     */
    public com.pobing.grpc.lib.move.MoveResponse sayMove(com.pobing.grpc.lib.move.MoveRequest request) {
      return io.grpc.stub.ClientCalls.blockingUnaryCall(
          getChannel(), getSayMoveMethod(), getCallOptions(), request);
    }
  }

  /**
   */
  public static final class MoveServiceFutureStub extends io.grpc.stub.AbstractFutureStub<MoveServiceFutureStub> {
    private MoveServiceFutureStub(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected MoveServiceFutureStub build(
        io.grpc.Channel channel, io.grpc.CallOptions callOptions) {
      return new MoveServiceFutureStub(channel, callOptions);
    }

    /**
     */
    public com.google.common.util.concurrent.ListenableFuture<com.pobing.grpc.lib.move.MoveResponse> sayMove(
        com.pobing.grpc.lib.move.MoveRequest request) {
      return io.grpc.stub.ClientCalls.futureUnaryCall(
          getChannel().newCall(getSayMoveMethod(), getCallOptions()), request);
    }
  }

  private static final int METHODID_SAY_MOVE = 0;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final MoveServiceImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(MoveServiceImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_SAY_MOVE:
          serviceImpl.sayMove((com.pobing.grpc.lib.move.MoveRequest) request,
              (io.grpc.stub.StreamObserver<com.pobing.grpc.lib.move.MoveResponse>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class MoveServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    MoveServiceBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return com.pobing.grpc.lib.move.MoveProto.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("MoveService");
    }
  }

  private static final class MoveServiceFileDescriptorSupplier
      extends MoveServiceBaseDescriptorSupplier {
    MoveServiceFileDescriptorSupplier() {}
  }

  private static final class MoveServiceMethodDescriptorSupplier
      extends MoveServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    MoveServiceMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (MoveServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new MoveServiceFileDescriptorSupplier())
              .addMethod(getSayMoveMethod())
              .build();
        }
      }
    }
    return result;
  }
}
